package com.vclee.fast.integration.power.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.vclee.fast.integration.power.model.SysUser;
import com.vclee.fast.integration.power.model.SysUserRole;
import com.vclee.fast.integration.power.model.vo.AdmLoginVo;
import com.vclee.fast.integration.power.model.vo.AdmSysUserPageQuery;
import com.vclee.fast.integration.power.model.vo.MenuTree;
import com.vclee.fast.integration.power.model.vo.SysUserPageVo;

import java.util.List;

public interface SysUserService {

    void editUser(SysUser sysUser);

    IPage<SysUserPageVo> getAdmSysUserList(AdmSysUserPageQuery query);

    AdmLoginVo adminLogin(String unique, String password, int flag);


    /**
     * 查询用户的全部角色
     *
     * @param userId 用户ID
     * @param flag 0 仅查询用户角色 1 查询用户所有角色
     * @return
     */
    List<SysUserRole> findUserRoleList(Integer userId, Integer flag);

    /**
     * 添加用户角色
     *  @param userId
     * @param roleIds
     * @param orgId
     */
    void addUserRole(Integer userId, List<Integer> roleIds, Integer flag, Integer orgId);

    /**
     * 查询登录账户的 所有菜单
     * @return
     */
    List<MenuTree> findUserMenuList(Integer userId);
}
